import service from "./service"
//原始登录
export const login = data=>{
        return service({
                url:'/wap/login',
                data
        })
}
//获取验证码
export const verifyCodeGetting = phone =>{
        console.log(phone)
        return service({
                url:'/wap/verifyCode',
                data:{phone}
        })
}
//获取用户基本信息
export const userSourceSetting = ()=>{
        return service({
                url:'/wap/member/base/memberInfo',
        })
}
//上传文件
export const upload = images=>{
        return service({
                url:'/wap/member/image/upload',
                data:images
        })
}
//首页信息
export const homeSource = ()=>{
        return service({
                url:'/wap/home/page'
        })
}

//首页搜索
export const homeSearchGetting = data=>{
        return service({
                url:'/wap/home/search',
                data
        })
}

//商品分类信息
export const productType = ()=>{
        return service({
                url:'/wap/static/cfg',
                data:{
                        code:'PRODUCT_TYPE'
                }
        })
}

//发布商品
export const publishProduct =data=>{
        return service({
                url:'/wap/member/product/publish',
                data
        })
}

//vip类型列表
export const memberTypeListSource = ()=>{
        return service({
                url:'/wap/member/vip/type'
        })
}
//商品详情
export const productDetail = productId=>{
        return service({
                url:'/wap/product/detail',
                data:{productId}
        })
}

//商品列表
export const productDataSource = data=>{
        return service({
                url:'/wap/product/list',
                data
        })
}

//问题反馈
export const feedback = data =>{
        return service({
                url:'/wap/member/feedback/publish',
                data
        })
}

//收藏操作
export const collectProduct = productId =>{
        return service({
                url:'/wap/member/product/star',
                data:{productId}
        })
}

//取消收藏
export const cancelCollect =productId=>{
        return service({
                url:'/wap/member/product/unstar',
                data:{productId}
        })
}
//收藏列表
export const collectionList = data=>{
        return service({
                url:'/wap/member/product/star/list',
                data
        })
}
